<%-- 
    Document   : rankings
    Created on : 15-Feb-2012, 19:10:34
    Author     : Pierre Buvé & Nicolas Van Damme
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel=stylesheet type="text/css" href="css/main.css">
        <link rel="stylesheet" href="css/jquery.ui.all.css"/>
        <link rel=stylesheet type="text/css" href="css/main.css">
        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script> 
        <script>
        /**
         * Jquery : permet de rajouter l'effet accordion.
         */
            $(function() {
                $( "#accordion" ).accordion({
                    autoHeight: false,
                    navigation: true
                });
            });
        </script>
        

        <title>Rankings</title>
    </head>
    <body>
        <%@include file="/WEB-INF/jsp/header.jsp" %>
        <c:if test="${not empty decobutton}">
            <div id="session"><form name="unlogbutton" method="POST" action="index.htm">
                    <input name="loadgame" type="submit" value ="<c:out value="${decobutton}" />"/>
                </form></div>
            </c:if>
        <h2>Classements</h2>

        <div id="accordion">
            
            <h3><a href="#">Meilleur temps par joueur</a></h3>
            <div>
                <table class="stats">
                    <c:forEach items="${model.rankingBestTimeList}" var="rankingBestTimeList"> 
                        <tr>
                            <td class="ranking"><c:out value="${rankingBestTimeList.username}" /></td>
                            <td class="ranking"><c:out value="${rankingBestTimeList.time}" /></td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
            
           <h3><a href="#">Moins bon temps par joueur</a></h3>
            <div>
                <table class="stats">
                    <c:forEach items="${model.rankingWorstTimeList}" var="rankingWorstTimeList"> 
                        <tr>
                            <td class="ranking"><c:out value="${rankingWorstTimeList.username}" /></td>
                            <td class="ranking"><c:out value="${rankingWorstTimeList.time}" /></td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
                        
            <h3><a href="#">Temps total par joueur</a></h3>
            <div>
                <table class="stats">
                    <c:forEach items="${model.rankingTotalTimeList}" var="rankingTotalTimeList">

                        <tr>
                            <td class="ranking"><c:out value="${rankingTotalTimeList.username}" /></td>
                            <td class="ranking"><c:out value="${rankingTotalTimeList.time}" /></td>
                        </tr>

                    </c:forEach>
                </table> 
            </div>
            
            <h3><a href="#">Temps moyen par joueur pour une victoire</a></h3>
            <div>
                <table class="stats">
                    <c:forEach items="${model.rankingAvgTimeVictoryList}" var="rankingAvgTimeVictoryList">

                        <tr>
                            <td class="ranking"><c:out value="${rankingAvgTimeVictoryList.username}" /></td>
                            <td class="ranking"><c:out value="${rankingAvgTimeVictoryList.time}" /></td>
                        </tr>

                    </c:forEach>
                </table> 
            </div>
            
        </div>
    </body>
</html>
